home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((3333CCCC++++++++)))) RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWGQueue(type) - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/gqueue.h>
-
-
-
- declare(RWGQueue, type)
- RWGQueue(type) a ;
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- Class RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((ttttyyyyppppeeee)))) represents a group of ordered elements, not
- accessible by an external key. A RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((ttttyyyyppppeeee)))) is a first in, first out
- (FIFO) sequential list for which insertions are made at one end (the
- "tail"), but all removals are made at the other (the "head"). Hence, the
- ordering is determined externally by the ordering of the insertions.
- Duplicates are allowed. This class is implemented as a singly-linked
- list. Objects of type RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((ttttyyyyppppeeee)))) are declared with macros defined in
- the standard C++ header file <<<<ggggeeeennnneeeerrrriiiicccc....hhhh>>>>. In order to find a particular
- item within the collection, a user-provided global "tester" function is
- required to test for a "match", definable in any consistent way. This
- function should have prototype:
-
- RWBoolean yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrrFFFFuuuunnnnccccttttiiiioooonnnn(const ttttyyyyppppeeee* c, const void* d);
-
-
-
-
-
- The argument cccc is a candidate within the collection to be tested for a
- match. The argument dddd is for your convenience and will be passed to
- yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrrFFFFuuuunnnnccccttttiiiioooonnnn(((()))).... The function should return TTTTRRRRUUUUEEEE if a "match" is
- found between cccc and dddd. In order to simplify the documentation below, an
- imaginary typedef
-
- typedef RWBoolean (*yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrr)(const ttttyyyyppppeeee*, const void*);
-
-
-
-
-
- has been used for this tester function.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((3333CCCC++++++++)))) RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((3333CCCC++++++++))))
-
-
-
- None
-
- PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
- RRRRWWWWGGGGQQQQuuuueeeeuuuueeee(ttttyyyyppppeeee)();
-
-
- Construct an empty queue.
-
- RRRRWWWWGGGGQQQQuuuueeeeuuuueeee(ttttyyyyppppeeee)(ttttyyyyppppeeee* a);
-
-
- Construct a queue with one entry aaaa.
-
- RRRRWWWWGGGGQQQQuuuueeeeuuuueeee(ttttyyyyppppeeee)(const RWGQueue(ttttyyyyppppeeee)& q);
-
-
- Copy constructor. A shallow copy of qqqq is made.
-
- AAAAssssssssiiiiggggnnnnmmmmeeeennnntttt OOOOppppeeeerrrraaaattttoooorrrr
- void
- ooooppppeeeerrrraaaattttoooorrrr====(const RWGQueue(ttttyyyyppppeeee)& q);
-
-
- Assignment operator. A shallow copy of qqqq is made.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
- ttttyyyyppppeeee*
- aaaappppppppeeeennnndddd(ttttyyyyppppeeee* a);
-
-
- Adds aaaa to the end of the queue and returns it. Returns nnnniiiillll if the
- insertion was unsuccessful.
-
- void
- cccclllleeeeaaaarrrr();
-
-
- Removes all items from the queue.
-
- RWBoolean
- ccccoooonnnnttttaaaaiiiinnnnssss(yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrr tttt, const void* d) const;
-
-
- Returns TTTTRRRRUUUUEEEE if the queue contains an item for which the user-defined
- function pointed to by tttt finds a match with dddd.
-
- RWBoolean
- ccccoooonnnnttttaaaaiiiinnnnssssRRRReeeeffffeeeerrrreeeennnncccceeee(const ttttyyyyppppeeee* e) const;
-
-
- Returns TTTTRRRRUUUUEEEE if the queue contains an item with the address eeee.
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((3333CCCC++++++++)))) RRRRWWWWGGGGQQQQuuuueeeeuuuueeee((((3333CCCC++++++++))))
-
-
-
- size_t
- eeeennnnttttrrrriiiieeeessss() const;
-
-
- Returns the number of items in the queue.
-
- ttttyyyyppppeeee*
- ffffiiiirrrrsssstttt() const;
-
-
- Returns the first item in the queue, or nnnniiiillll if the queue is empty.
-
- ttttyyyyppppeeee*
- ggggeeeetttt();
-
-
- Returns and rrrreeeemmmmoooovvvveeeessss the first item in the queue. Returns nnnniiiillll if the
- queue is empty.
-
- RWBoolean
- iiiissssEEEEmmmmppppttttyyyy() const;
-
-
- Returns TTTTRRRRUUUUEEEE if the queue is empty, otherwise FFFFAAAALLLLSSSSEEEE.
-
- ttttyyyyppppeeee*
- iiiinnnnsssseeeerrrrtttt(ttttyyyyppppeeee* a);
-
-
- Calls aaaappppppppeeeennnndddd((((ttttyyyyppppeeee****)))) with aaaa as the argument.
-
- ttttyyyyppppeeee*
- llllaaaasssstttt();
-
-
- Returns the last (most recently inserted) item in the queue, or nnnniiiillll if
- the queue is empty.
-
- size_t
- ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrr t, const void* d) const;
-
-
- Returns the number of items in the queue for which the user-provided
- function pointed to by tttt finds a match with dddd.
-
- size_t
- ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffffRRRReeeeffffeeeerrrreeeennnncccceeee(const ttttyyyyppppeeee* e) const;
-
-
- Returns the number of items in the queue with the address eeee....
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-